description "Kubelet"

start on filesystem or runlevel [2345]
stop on runlevel [S016]

script
  service docker start 
  source /etc/kubernetes/config
  source /etc/kubernetes/kubelet
  echo $$ > /var/run/kubelet.pid
  exec /usr/local/bin/kubelet ${KUBE_LOGTOSTDERR} ${KUBE_LOG_LEVEL} ${KUBE_ETCD_SERVERS} ${KUBELET_ADDRESS} ${KUBELET_PORT} ${KUBELET_HOSTNAME} ${KUBE_ALLOW_PRIV} ${KUBELET_ARGS} 1>>/var/log/kubelet.log 2>&1 
end script

pre-start script
  echo "[`date`] Starting kubelet .. " >> /var/log/kubelet.log
end script

pre-stop script
  rm /var/run/kubelet.pid
  echo "[`date`] Stopping kubelet .. " >> /var/log/kubelet.log
end script
